Conversation
lrhn
reviewed
Jul 10, 2026
| **definite completion** analysis specified elsewhere. | ||
| - Let `T` be `Null` if any control path reaches the end of the block | ||
| without exiting the block, as computed by the **definite completion** | ||
| analysis specified elsewhere. |
Member
There was a problem hiding this comment.
(You can probably guess I'd prefer that case to have type void 😁 . Not returning something is not the same as returning null. It's the same as not returning anything useful. Alas, not where we are today.)
lrhn
reviewed
Jul 10, 2026
| block without reaching the end of the block, as computed by the | ||
| **definite completion** analysis specified elsewhere. | ||
| - Let `T` be `Null` if any control path reaches the end of the block | ||
| without exiting the block, as computed by the **definite completion** |
Member
There was a problem hiding this comment.
Is "without exiting the block" redundant? Or just confusing?
If control reaches the end, then it definitely didn't exit before that.
On the other hand, it will exit as the very next thing, so does it really "reach then end of the block without exiting" when it "reaches the block and exits"?
lrhn
approved these changes
Jul 10, 2026
eernstg
force-pushed
the
spec_4718_jul26
branch
2 times, most recently
from
September 15, 2026 09:16
3f52a51 to
a7a662f
Compare
eernstg
force-pushed
the
spec_4718_jul26
branch
from
September 17, 2026 08:00
a7a662f to
c8cdc73
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the specification of type inference such that the inferred return type of a generator function literal does not include a spurious
Null, which is otherwise added in the case where the end of the body of the function literal can be reached. For example,() sync* {}has inferred return typeIterable<Null>, but with this change it will beIterable<Never>, as it should be.